const request = require('request');
const { sys } = require('../config');
const commonUtil = require('../utils/common_util');
const modelCombination = require('../res/modelCombination.json');

// request.post('http://localhost:20090/modelCombination/save', { form: modelCombination });


const saveModelCombination = (headers) => {
  console.log(JSON.stringify(headers));
  request.post({ url: `${sys.testUrl}/combinationModel/save`,
    json: modelCombination,headers }, (err, httpResponse, body) => {
    commonUtil.compareResult(body, null, 'saveCombinationModel');
  });
};

// const saveModelCombination = (headers) => {
//   request({ url: `${sys.testUrl}/combinationModel/save`,
//     headers }, (err, httpResponse, body) => {
//     commonUtil.compareResult(body, null, 'saveCombinationModel');
//   });
// };


exports.testAll = (headers) => {
  // 测试打开方案
  saveModelCombination(headers);
};
